Skip to content

fix: handle wheels without hash digests from private registries#793

Open
roundhd wants to merge 1 commit intoaspect-build:mainfrom
roundhd:fix/hashless-wheels
Open

fix: handle wheels without hash digests from private registries#793
roundhd wants to merge 1 commit intoaspect-build:mainfrom
roundhd:fix/hashless-wheels

Conversation

@roundhd
Copy link

@roundhd roundhd commented Feb 12, 2026

Summary

Private PyPI registries (e.g., Azure Artifacts, Artifactory) may not serve PEP 503 hash fragments in download URLs. The uv extension unconditionally accesses whl["hash"] in _whl_repo_name and _raw_whl_repos, causing a KeyError.

Changes:

  • _whl_repo_name: Fall back to sha1(whl["url"])[:8] when "hash" key is missing
  • _raw_whl_repos: Use empty string for shasum when "hash" key is missing

Fixes #790

Private PyPI registries (e.g., Azure Artifacts, Artifactory) may not
serve PEP 503 hash fragments in download URLs. This causes KeyError
when `_whl_repo_name` and `_raw_whl_repos` unconditionally access
`whl["hash"]`.

Fall back to `sha1(whl["url"])[:8]` for repo naming and empty string
for shasum when hash is missing.

Fixes aspect-build#790
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Shiyuan Zheng seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aspect-workflows
Copy link

aspect-workflows bot commented Feb 12, 2026

Bazel 8 (Test)

All tests were cache hits

31 tests (100.0%) were fully cached saving 48s.


Bazel 9 (Test)

All tests were cache hits

31 tests (100.0%) were fully cached saving 1m 10s.


Bazel 8 (Test)

e2e

All tests were cache hits

14 tests (100.0%) were fully cached saving 12s.


Bazel 9 (Test)

e2e

All tests were cache hits

12 tests (100.0%) were fully cached saving 7s.


Bazel 8 (Test)

examples/uv_pip_compile

All tests were cache hits

1 test (100.0%) was fully cached saving 335ms.

@arrdem
Copy link
Collaborator

arrdem commented Feb 13, 2026

Good find, will have to cherry pick this into the reworked extension.

@arrdem arrdem self-assigned this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: uv extension crashes on wheels without hash digests from private registries

3 participants

Comments